InvokeMethod(IRemoteMethodExecuter agent, System.Reflection.MethodBase method, object instance, object[] parameters) Method
Invokes the method on the remote server using the specified arguments, and returns the result.
Syntax
public
static
object InvokeMethod(IRemoteMethodExecuter agent, System.Reflection.MethodBase method, object instance, object[] parameters)
Parameters
- agent
- Type: IRemoteMethodExecuter
The agent.
- method
- Type: System.Reflection.MethodBase
The method to invoke.
- instance
- Type: object
The instance to serialize and invoke the method on.
- parameters
- Type: object[]
The parameters to pass to the method. May be null (Nothing in Visual Basic) if there are no parameters.
Returns
Return value of the method if applicable; otherwise null (Nothing in Visual Basic).
Exceptions
System.ArgumentNullException
|
method is null (Nothing in Visual Basic).
|
System.ArgumentException
|
method is not valid or parameters are not valid. See Remarks.
|